<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="../assert_selection.js"></script>
<script src="spellcheck_test.js"></script>

<script>
spellcheck_test(
    '<div contenteditable>zz&nbsp;|</div>',
    '',
    '<div contenteditable>#zz# </div>',
    {
      title: 'Has marker on initially misspelled word.',
      callback: sample => spellcheck_test(
          sample,
          (document, testRunner) => {
            testRunner.execCommand('DeleteBackward');
            testRunner.execCommand('DeleteBackward');
            document.execCommand('InsertText', false, ' ');
          },
          '<div contenteditable>z </div>',
          'Blink spellchecks a word again when changing a misspelled word')
    });
</script>
